<template>
  <div class="container">
    <div>
      <div class="header">暂存点信息</div>
      <el-table v-loading="dataset.loading" :data="dataset.item" class="el-mb-15" stripe>
        <el-table-column prop="realname" label="联系人姓名" />
        <el-table-column prop="phone" label="联系电话" />
        <el-table-column prop="zhicheng" label="负责区域" />
      </el-table>
    </div>
    <div>
      <div class="header">货物信息</div>
      <el-table v-loading="dataset.loading" :data="dataset.shop" class="el-mb-15" stripe>
        <el-table-column prop="name" label="大类名称" />
        <el-table-column prop="sumNumber" label="总重量" />
        
      </el-table>
	  <el-table v-loading="dataset.loading" :data="dataset.list" class="el-mb-15" stripe>
        <el-table-column prop="name" label="大类详情" />
        <el-table-column prop="weighting_num" label="重量" />
		<el-table-column prop="danweiming" label="单位" />
		<el-table-column prop="price" label="价格" />
        
      </el-table>
    </div>
    <div>
      <div class="header">入库信息</div>
      <el-table v-loading="dataset.loading" :data="dataset.item" class="el-mb-15" stripe>
        <el-table-column prop="create_time" label="此表打印时间" />
        <el-table-column prop label="送货人签名（手写）" />
        <el-table-column prop label="会计签名（手写）" />
        <el-table-column prop label="库管签名（手写）" />
        <el-table-column prop label="入库时间（手写）" />
      </el-table>
    </div>
  </div>
</template>
<script>
import {
  Table,
  TableColumn,
  Pagination,
  Button,
  Select,
  Option,
  Drawer,
  Dialog,
  MessageBox,
  Message
} from "element-ui";

export default {
  components: {
    [Table.name]: Table,
    [TableColumn.name]: TableColumn,
    [Pagination.name]: Pagination,
    [Button.name]: Button,
    [Select.name]: Select,
    [Option.name]: Option,
    [Drawer.name]: Drawer,
    [Dialog.name]: Dialog
  },
  data() {
    return {
      dataset: {
        loading: false,
        total: 0,
        limit: 10,
        page: 1,
        item: [],
		    list:[],
		    shop:[]
      }
    };
  },
  mounted() {
    this.controllerRequestListDataset();
  },
  methods: {
    controllerRequestListDataset() {
    
      if (this.dataset.loading) return;
      else this.dataset.loading = true;
      

      var url = "/api/admin/order/getListDetailsByKuaiJi",
        params = {
          id: this.$route.query.id,
          token: this.$store.state.options.user.token
        };

      this.$util.postRequestInterface(url, params, {
        success: res => {
			// console.log(res.data)
      var arr=[]
      var orderInfoList=[]
      orderInfoList.push(res.data.orderInfo);
      res.data.orderInfoList=orderInfoList;
      // date.push("orderInfoList",orderInfoList);
      delete res.data.orderInfo
      //  console.log("数组");
      // console.log("数组"+res.data)
			// for(let i in res.data) {
      //   	console.log("循环数组："+res.data[i])
    	// 		arr.push(res.data[i]); 
			// }
		  	this.dataset.item =res.data.orderInfoList ;
		  	this.dataset.shop = res.data.garbageSum;
            this.dataset.list = res.data.garbageInfo
         
        },
        complete: e => {
          this.dataset.loading = false;
        }
      });
    }
  }
};
</script>
<style lang="scss" scoped>
.header {
  width: 100px;
  margin: 0 auto;
}
</style>

